Function: c-clear->-pair-props-if-match-before

c-clear->-pair-props-if-match-before is a byte-compiled function defined in cc-engine.el.gz.

Signature

(c-clear->-pair-props-if-match-before LIM &optional POS)

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/cc-engine.el.gz
(defun c-clear->-pair-props-if-match-before (lim &optional pos)
  ;; POS (default point) is at a > character.  If it is both marked
  ;; with open/close paren syntax-table property, and has a matching <
  ;; (also marked) which is before LIM, remove the property both from
  ;; the current < and its partner.  Return t when this happens, nil
  ;; when it doesn't.
  (save-excursion
    (if pos
	(goto-char pos)
      (setq pos (point)))
    (when (equal (c-get-char-property (point) 'syntax-table)
		 c->-as-paren-syntax)
      (with-syntax-table c-no-parens-syntax-table ; ignore unbalanced [,{,(,..
	(c-go-up-list-backward))
      (when (and (<= (point) lim)
		 (equal (c-get-char-property (point) 'syntax-table)
			c-<-as-paren-syntax)) ; should always be true.
	(c-unmark-<->-as-paren (point))
	(c-truncate-lit-pos-cache (point))
	(c-unmark-<->-as-paren pos))
      t)))